.halo-rich-text-editor {
  .details {
    display: flex;
    gap: 0.25rem;
    margin: 1.5rem 0;
    border: 1px solid var(--editor-details-border);
    border-radius: 0.5rem;
    padding: 0.5rem;

    summary {
      all: unset;
      font-weight: 700;
    }

    > button {
      align-items: center;
      background: transparent;
      border: none;
      border-radius: 4px;
      display: flex;
      font-size: 1rem;
      height: 2rem;
      justify-content: center;
      line-height: 1;
      margin-top: 0;
      padding: 0;
      width: 2rem;
      cursor: pointer;
      transition: background-color 0.15s ease;

      &:hover {
        background-color: var(--editor-details-hover-bg);
      }

      // 使用 SVG 图标 - 右箭头（折叠状态）
      &::before {
        content: "";
        display: inline-block;
        width: 1.25em;
        height: 1.25em;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='currentColor' d='m13.171 12l-4.95-4.95l1.415-1.413L16 12l-6.364 6.364l-1.414-1.415z'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
      }
    }

    // 展开状态 - 下箭头
    &.is-open > button::before {
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='currentColor' d='m12 13.171l4.95-4.95l1.414 1.415L12 16L5.636 9.636L7.05 8.222z'/%3E%3C/svg%3E");
      transform: none;
    }

    > div {
      display: flex;
      flex-direction: column;
      gap: 1rem;
      width: 100%;

      > [data-type="detailsContent"] > :last-child {
        margin-bottom: 0.5rem;
      }
    }

    .details {
      margin: 0.5rem 0;
    }
  }
}
